<?php
include("CrawlerURL.php");
class CrawerURL4399 implements CrawlerURL{
	public function parseURLS($url,$reg){
		$isCollect = true;

		$fp = @fopen($url,"r") or $isCollect = false;

		if(isCollect){
			$fcontent = file_get_contents($url);
			$games = iconv("gbk", "utf-8//IGNORE", $fcontent);
		//	eregi("<div class=\"ClassGameList\">\r\n<div id=\"tab1\">\r\n<ul>(.*)</ul>\r\n<div id=\"PageList01\">", $games,$ab);
		eregi("<div class=\"z_game_center\">(.*)<div id=\"PageList\"", $games,$ab);
//		echo $ab[0];
		//	preg_match_all("/<a href=\"(.*?)\"><img/",$ab[0],$abc);
		    preg_match_all("/$reg/",$ab[0],$abc);
			$urls = $abc[1];
//			print_r($abc[1]);
			
			return $urls;
		}
	}
}